package com.sky.mapper;

import com.sky.entity.AddressBook;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface AddressBookMapper {

    void insert(AddressBook addressBook);


    List<AddressBook> list(AddressBook addressBook);

    void update(AddressBook addressBook);

    @Select("select *from address_book where id=#{id}")
    AddressBook queryById(Long id);

    @Delete("delete from address_book where id=#{id}")
    void delete(Long id);

    void updateIsDefaultByUser(AddressBook addressBook);



}
